#ifndef LIBRARY_RFILEWRITER_H
#define LIBRARY_RFILEWRITER_H

#include "rfile.h"
#include "rfileformat.h"

namespace Library
{

class PLIBEXP ResourceFileWriter : public ResourceFile
{
	public:
						ResourceFileWriter();
		virtual			~ResourceFileWriter();

		// ResourceFile overrides.
		virtual	bool8	open(const String & filename);
		virtual	bool8	close();

		// ResourceFileWriter originals.
		virtual bool8	add(const String & name, uint32 size, uint8 * data);

		virtual bool8	compression();
		virtual void	compression(bool8 compression);

		virtual Format	format();
		virtual bool8	format(Format format);

		virtual bool8	remove(const String & name);
		virtual bool8	rename(const String & from, const String & to);

		virtual	bool8	save(const String & filename);
		virtual	bool8	save(pStream stream);

		virtual String	tocHeader();
		virtual String	tocDetailsOf(const String & name);

	protected:
		// ResourceFile overrides.
		virtual bool8	archive(Header * header);
		virtual pResourceEntry	createResourceEntry();

		// ResourceFileWriter originals.
		virtual bool8	reset();

	protected:
		bool8			m_compression;
		Header			m_header;

	// prohibited
	private:
		ResourceFileWriter(ResourceFile &);
		ResourceFileWriter & operator=(ResourceFile &);
};


//----------------------------------------------------------------------------


//----------------------------------------------------------------------------
// Documentation, prohibited methods (unimplemented)
//

/**
 * @fn Library::ResourceFileWriter::File(Library::ResourceFile &)
 *
 * This method is reserved and unimplemented.  It has been defined for
 * Orthodox Canonical Form (OCF) compliance to prevent shallow object copies
 * from inadvertent use.
 */

/**
 * @fn Library::ResourceFileWriter & Library::ResourceFileWriter::operator=(Library::ResourceFile &)
 *
 * This method is reserved and unimplemented.  It has been defined for
 * Orthodox Canonical Form (OCF) compliance to prevent shallow object copies
 * from inadvertent use.
 */

}; // namespace Library

#endif

//
// vim: nowrap
//
